﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OpenQA.Selenium;


namespace AutoTestingFramework.Core
{
    public abstract class PageObjectModelBase
    {
        /// <summary>
        /// Relative uri of <see cref="TestBase"/> BaseUrl
        /// </summary>
       protected string Uri { get; set; }
    }

    public abstract class PageObjectModelBase<T> : PageObjectModelBase where T : PageObjectModelBase
    {
        private TestBase _testObject { get; set; }

        public PageObjectModelBase(TestBase testObject)
        {
            this._testObject = testObject;
        }

        //public T Go()
        //{
        //   implement the navigation to current testpage
        //    if (Uri==null)
        //    {
        //        throw new NotImplementedException("This page cannot navigated to this uri or the Uri property is not set.");
        //    }
        //    return this.Go(Uri);
        //}
        //public T Go(string url)
        //{
        //    _testObject.WebBroswer.Navigate().GoToUrl(url);
        //    return this as T;
        //}
    }
}
